package docoffice.gui;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.LayoutStyle.ComponentPlacement;

/**
 * Doctor GUI
 * 
 * Will represent what the Doctor user interacts with.
 * @author Jackie Trujillo
 * @version $Revision: 1.0 $
 */

public class DoctorGUI {

	private JFrame frame;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					DoctorGUI window = new DoctorGUI();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public DoctorGUI() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JLabel label = new JLabel("Doctor Login");
		label.setFont(new Font("Engravers MT", Font.PLAIN, 16));
		
		JButton btnCreatePatient = new JButton("Create Patient");
		btnCreatePatient.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		
		JButton btnDoctorOrders = new JButton("Doctor Orders");
		
		JButton btnDeletePatient = new JButton("Delete Patient");
		
		JButton btnEditPatient = new JButton("View Patient");
		
		JButton btnCreateTreatmentRecord = new JButton("Create Treatment Record");
		
		JButton btnViewReports = new JButton("View Reports");
		
		JButton btnViewAppointments = new JButton("View Appointments");
		GroupLayout groupLayout = new GroupLayout(frame.getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(38)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false)
								.addGroup(groupLayout.createSequentialGroup()
									.addComponent(btnCreatePatient)
									.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
									.addComponent(btnCreateTreatmentRecord))
								.addGroup(groupLayout.createSequentialGroup()
									.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
										.addComponent(btnEditPatient)
										.addComponent(btnDeletePatient))
									.addGap(103)
									.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
										.addComponent(btnViewReports)
										.addComponent(btnDoctorOrders)))))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(137)
							.addComponent(btnViewAppointments))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(139)
							.addComponent(label, GroupLayout.PREFERRED_SIZE, 172, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap(45, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(32)
					.addComponent(label, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
					.addGap(33)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnCreatePatient)
						.addComponent(btnCreateTreatmentRecord))
					.addGap(6)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnDoctorOrders)
						.addComponent(btnDeletePatient))
					.addGap(9)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnViewReports)
						.addComponent(btnEditPatient))
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(btnViewAppointments)
					.addContainerGap(51, Short.MAX_VALUE))
		);
		frame.getContentPane().setLayout(groupLayout);
	}

}
